package com.leetcode.根据数据结构分类.队列;

import java.util.LinkedList;
import java.util.List;

/**
 * @author: xiaomi
 * @date: 2021/2/12
 * @description:    使用循环数组或者链表实现队列
 * https://leetcode-cn.com/leetbook/read/high-frequency-algorithm-exercise/xyph5t/
 * 鉴于之前已经实现过，那么就简单的直接使用 LinkedList
 */
public class LCQueue {

    private List<Integer> list = new LinkedList<>();

    public LCQueue() {

    }

    public void push(int x) {
list.add(x);
    }

    public void pop() {
        list.remove(0);
    }

    public int size() {
return list.size();
    }

    public int front() {
        return list.get(0);
    }

}
